import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './modules/user/user.module';
import { AuthModule } from './modules/auth/auth.module';
import { BookModule } from './modules/book/book.module';
import {JwtModule} from '@nestjs/jwt';
import { MenuModule } from './modules/menu/menu.module';
@Module({
  imports: [TypeOrmModule.forRoot({
    type: 'mysql',
    host: 'localhost',
    port: 3306,
    username: 'root',
    password: 'root',
    database:"vben-book-dev",
    autoLoadEntities: true,
    // synchronize: true, // 生产环境请关闭该选项
  }), UserModule, AuthModule, BookModule,JwtModule, MenuModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
